#:kivy 1.6.0
#:import DisableableButton ui.disableable_button.DisableableButton
#:import FittableButton ui.fittable_widgets.FittableButton
#:import FittableLabel ui.fittable_widgets.FittableLabel
#:import FittableTextInput ui.fittable_widgets.FittableTextInput
<AddPlayerScreen>:
    to_add_button: to_add_button
    text_input: text_input
    BoxLayout:
        orientation: 'vertical'
        size: root.size
        BoxLayout:
            orientation: 'horizontal'
            size_hint_y: None
            height: root.height*0.1
            DisableableButton:
                color_name: 'green' if self.enabled else 'default'
                id: to_add_button
                enabled: root.state.name_valid
                text: _('Next')
                on_release: root.on_add_user_pressed()
        FittableTextInput:
            id: text_input
            size_hint_y: 0.4
            text: root.state.player_name
            on_text: root.update_name(args[1])
            multiline: False
            on_text_validate: root.on_add_user_pressed()
            focus: True
            font_size: 0.6*self.height
        Label:
            text: _('Player\'s name')
        Label:
        Label:


